package week6;

public class PC {
    private CPU cpu;
    private HardDisk HD;

    public CPU getCpu() {
        return cpu;
    }

    public void setCPU(CPU cpu){
        this.cpu = cpu;
    }

    public HardDisk getHD() {
        return HD;
    }

    public void setHardDisk(HardDisk hardDisk){
        this.HD = hardDisk;
    }
    public void show(){
        System.out.println("CPU速度："+ cpu.getSpeed());
        System.out.println("硬盘容量："+HD.getAmount());
    }
}
